import request from '@/utils/request'
// 查询id
export function getPurchaseDetailid(id) {
    return request({
      url: '/finance/kltPurchaseDetail/'+id,
      method: 'get'
    })
  }
  // 查询list
export function getPurchaseDetailList(query) {
  return request({
    url: '/finance/kltPurchaseDetail/list',
    method: 'get',
    params: query
  })
}
// 查询所有数据
export function getAllPurchaseDetail(query) {
  return request({
    url: '/finance/kltPurchaseDetail/selectAll',
    method: 'get',
    params: query
  })
}

// 新增
export function getPurchaseDetailInsert(data) {
  return request({
    url: '/finance/kltPurchaseDetail',
    method: 'post',
    data: data
  })
}

// 修改
export function getPurchaseDetailEdit(data) {
  return request({
    url: '/finance/kltPurchaseDetail',
    method: 'put',
    data: data
  })
}


// 删除
export function getPurchaseDetailDelete(data) {
  return request({
    url: '/finance/kltPurchaseDetail?idList='+data,
    method: 'delete',
    
  })
}


// list计数
export function getPurchaseDetailCount(data) {
  return request({
    url: '/finance/kltPurchaseDetail/count',
    method: 'get',
    params:data
  })
}

// 修改库存
export function getPurchaseDetailaddStock(data) {
  return request({
    url: '/finance/kltPurchaseDetail/addStockByPurchase',
    method: 'put',
    data: data
  })
}


// 统计数据
export function getProcurementStatistics(data) {
  return request({
    url: '/finance/kltPurchaseDetail/getProcurementStatistics',
    method: 'get',
    params: data
  })
}
